package J11_10;

import java.util.*;

public class Test1 {
    static int[] l = {1, -1, 0, 0};
    static int[] r = {0, 0, 1, -1};
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        int d = in.nextInt();
        long[][] arr = new long[a + 1][b + 1];
        int[] k = {-1, -2, -1, -2, 1, 2, 1, 2};
        int[] p = {-2, -1, 2, 1, -2, -1, 2, 1};
        Set<List<Integer>> set = new HashSet<>();
        set.add(List.of(c, d));
        for (int i = 0; i < 8; i++) {
            int ma = c + k[i];
            int mb = d + p[i];
            if (ma >= 0 && ma <= a && mb >= 0 && mb <= b) {
                set.add(List.of(ma, mb));
            }
        }
        arr[0][0] = 1;
        for (int i = 0; i <= a; i++) {
            for (int j = 0; j <= b; j++) {
                if (i == 0 && j == 0) continue;
                if (set.contains(List.of(i, j))) {
                    continue;
                }
                if (i == 0 && j != 0) {
                    arr[i][j] = arr[i][j - 1];
                }else if (j == 0) {
                    arr[i][j] = arr[i - 1][j];
                } else {
                    arr[i][j] = arr[i - 1][j] + arr[i][j - 1];
                }
            }
        }
        System.out.println(arr[a][b]);

    }
}
